package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.MjNormalUser;
import org.tgcloud.group.web.controller.dto.user.NormalUserNameDTO;
import org.tgcloud.group.web.controller.dto.user.UserAppDTO;
import org.tgcloud.group.web.controller.dto.user.UserDTO;

import java.util.Date;
import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-08-29-下午4:37
 * @Description: ${description}
 */
public interface MjNormalUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MjNormalUser record);

    int insertSelective(MjNormalUser record);

    MjNormalUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjNormalUser record);

    int updateByPrimaryKey(MjNormalUser record);

    UserAppDTO selectMsgByOpenId(@Param("openId") String openid);

    List<UserDTO> selectManageListByKeyword(@Param("keyword") String keyword, @Param("startTime") Date startTime, @Param("endTime") Date endTime,
                                            @Param("userType") Short userType, @Param("isAssistant") Short isAssistant, @Param("userId") Integer userId);

    int updateUserTypeByUserId(@Param("userId") Integer userId, @Param("userType") Short userType);

    int updateUserNameByUserId(@Param("userId") Integer userId, @Param("username") String username);

    List<UserDTO> selectAppListByKeyword(@Param("userType") Short userType, @Param("split") String[] split,
                                         @Param("pushUserIds") String[] pushUserIds);

    MjNormalUser selectMsgByTelephone(@Param("telephone") String telephone);

    UserAppDTO selectMsgByTel(@Param("telephone") String telephone);

    List<MjNormalUser> selectListByUserType(@Param("userType") short userType);

    int updatePushUserIdIsNullById(@Param("userId") Integer userId);

    int updateSubscribeByUserId(@Param("userId") int userId, @Param("subscribeType") short subscribeType);

    String selectAllPushIds(@Param("exportUserIds") String[] exportUserIds);

    List<MjNormalUser> selectChannelListByUserId(@Param("userId") int userId);

    List<MjNormalUser> selectPushList(@Param("isAssistant") Short isAssistant);

    List<MjNormalUser> selectAssistantList(@Param("assistantUserId") Integer assistantUserId);

    List<String> selectUserNameByIds(@Param("ids") String[] split);

    List<Integer> selectPushUserIdByIds(@Param("userIds") String[] userIds);

    List<MjNormalUser> selectAssistantsById(@Param("pushUserId") Integer pushUserId);

    MjNormalUser selectPushById(@Param("userId") Integer userId);

    NormalUserNameDTO selectPushNameByChannelId(@Param("userId") Integer userId);

    int resetPoineer(@Param("userId") Integer userId);

    List<MjNormalUser> selectUserListByIds(@Param("ids") String[] split);

    List<MjNormalUser> selectSelectionManageUserList();

    List<MjNormalUser> selectSelectionAssistantUserList(@Param("userId") Integer id);
}